package com.ctshk.rpc.order.tour.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.rpc.order.tour.entity.SeriesOrderAmountStatistics;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 系列团订单金额统计 Mapper 接口
 * </p>
 *
 * @author 谭响
 * @since 2021-01-18
 */
public interface SeriesOrderAmountStatisticsMapper extends BaseMapper<SeriesOrderAmountStatistics> {

    /**
     * 根据订单id查询统计订单
     * @param orderId
     * @return
     */
    @Select("SELECT id,order_id,schedule_id,total_receivables,total_paid_in,remaining_receivables,refund_amount \n" +
            "FROM t_series_order_amount_statistics \n" +
            "WHERE order_id = #{order_id}")
    SeriesOrderAmountStatistics selectByOrderId(@Param("order_id") Long orderId);
}
